package org.lzy.shop.viewmodel.repository.lmpl

import org.lzy.shop.network.KtorApiService
import org.lzy.shop.viewmodel.repository.BaseRepository
import org.lzy.shop.viewmodel.repository.PayRepository

/**
 * 支付数据仓库实现类
 */
class PayRepositoryImpl : BaseRepository(), PayRepository {

    override suspend fun pay(orderId: Int, payType: Int): String? {
        return safeApiCall {
            val response = KtorApiService.pay(orderId, payType)
            handleResponse(response)
        }
    }
}